<?php

/**
 * Transf nr saptamana in array de zile
 * @param  $iWeek
 * @param  $iYear
 * @return    array
 */
function weekToDays($iWeek, $iYear) {
    $aResult = array();
    $week_number = $iWeek;
    $year = $iYear;
    for ($day = 1; $day <= 7; $day++) {
        $aResult[] = date('d.m', strtotime($year . "W" . $week_number . $day)) . "\n";
    }
    return $aResult;
}